Peripheral devices for large computers, e.g., tape and disk systems, need to send and/or receive data from the computer in large quantities. Various types of channels have been developed for this purpose. Typically the peripheral systems include a component called a controller which connects to the channel. The controller may be a physically separate device or it may be integrated into a single device. For example, integrated controller/disk file systems are sometimes called disk subsystems. The disk files contain the actual data storage hardware. The term subsystem will be used herein to refer to a peripheral system which attaches directly to a channel.
Typically the computer is operating under the control of a multiprogramming operating system, such as any one of IBM's well-known MVS family of operating systems, which allows multiple programs (or tasks) to execute in an interleaved manner so that the peripheral system is, in effect, shared by multiple programs. Since multiple computers may be connected to a subsystem, the sharing of the subsystem's resources can also occur between computers. To operate the subsystem a program running on the computer sends commands and data addressed to the subsystem out on the channel. The connection between the subsystem and the computer allows for two-way communication so that the subsystem can also send status information and data to the computer. The status information returned by the subsystem includes return codes indicative of the success or failure of the commands. Typical disk systems have means for detecting errors in read and write actions as well as various other functions. A typical subsystem includes one or more microprocessors and one or more memory means into which a special software program, typically called microcode or firmware, is loaded. The actions taken by the subsystem in response to commands usually involve the microprocessor running or executing some pad of the microcode. In a channel environment the commands sent to the controller may be called channel commands or channel command words (CCW). Channel commands are typically communicated to the controller in a list of connected commands which are called a channel command program or command chain (CCC). The channel commands in the channel program are said to be chained together. Typically a command chain has exclusive access to the subsystem only while the chain is executing. A computer program seeking to access a subsystem may have to send several command chains to achieve a desired result. The command chains from one program may be interleaved with chains from other programs by a single computer's operating system or by the different computers.
One conventional method of storing data on disk is the count-key-data (CKD) system. The beginning of each track is reserved for the `track header` which consists of Home Address (HA) and Record Zero (R0) count fields. The HA contains a flag which indicates whether an alternate track has been assigned and the R0 count field is used to record the pointer to an alternate track. Following the HA and R0, variable length records are stored on the disk with a count field preceding the key and the data.
Since the channel must be shared by all of the attached subsystems, it is important to maximize the efficiency of channel usage. When the channel speed is higher than the device speed the timing of certain channel data transfers is critical for maximum efficiency. If channel data transfer begins too soon it cart waste a valuable resource and cause dangerous path congestion. Transfers begun too late may elongate subsystem service and response times. Prior art controllers usually use a grab and run type of algorithm where the channel is connected the entire time the device is transferring data. When optimized a high speed channel can be used to service several jobs in the time that it would have only serviced one using a grab and run technique. The technique of the invention described below yields better channel utilization and, therefore, higher performance.